package com.caine.mybatis.sqlSession;

import com.caine.mybatis.definition.CaineInvocationHandler;

import java.lang.reflect.Proxy;

/**
 * @Author: CaineZhu
 * @Description:
 * @Date: Created in 10:13 2020/11/2
 * @Modified By:
 */
public class CaineSession {
    public static Object getMapper(Class clazz) {
        Class[] clazzs = new Class[]{clazz};
        Object o = Proxy.newProxyInstance(CaineSession.class.getClassLoader(), clazzs, new CaineInvocationHandler());
        return o;
    }
}
